﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows;

namespace VRacer
{
    /// <summary>
    /// Zawodnik sterowany przez czlowieka. Zawiera m.in. statystyki czasowe gracza, oraz obsluge ich generowania.
    /// </summary>
    public class HumanPlayer : PlayerBase, ITimeStatistics
    {
        private TimeStatistics _timeStats = new TimeStatistics();

        public HumanPlayer()
        {
            Title = PlayerBase.GetName();
        }

        #region ITimeStatistics Members

        TimeStatistics ITimeStatistics.Statistics
        {
            get { return _timeStats; }
        }

        #endregion

        protected override void OnActivated()
        {
            base.OnActivated();
            _timeStats.Start();
        }

        protected override void OnDeactivated()
        {
            base.OnDeactivated();
            _timeStats.End();
        }
    }
}
